package com.iha.pongzor.gui;

import com.iha.pongzor.R;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.Button;

public class Contact extends Activity {
	    	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		this.requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.contact);
		
        Button map_button = (Button) findViewById(R.id.contact_btn_map);
        map_button.setOnClickListener(new View.OnClickListener() {
            
			public void onClick(View v) {
            	startActivity(new Intent(v.getContext(), Map.class));
			}
		});
		
        Button homepage_button = (Button) findViewById(R.id.contact_btn_homepage);
        homepage_button.setOnClickListener(new View.OnClickListener() {
            
			public void onClick(View v) {
            	Intent browse = new Intent(Intent.ACTION_VIEW);
            	browse.setData(Uri.parse(getString(R.string.contactWebsite)));
				startActivity(browse);
			}
		});
        
        Button call_button = (Button) findViewById(R.id.contact_btn_call);
        call_button.setOnClickListener(new View.OnClickListener() {
			
			public void onClick(View v) {
				Intent call = new Intent(Intent.ACTION_CALL, Uri.parse(getString(R.string.contactNumber)));
				startActivity(call);
			}
		});
	}
}
